<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('医疗器械库存清算列表')"/>
    <style>
        .back {
            float: right;
            margin-right: 50px;
        }
    </style>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <input type="hidden" id="name" th:value="${name}">
                        </li>
                        <li class="select-time">
                            <label>时间：</label>
                            <input type="text" class="time-input" id="time" placeholder="" name="time"
                                   style="width: 200px;height: 30px;"/>
                        </li>
                        <li>
                            <label>入库数量：</label>
                            <input type="text" name="inStorageNum"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>

        <div class="btn-group-sm" id="toolbar" role="group">
            <a class="btn btn-warning" onclick="$.table.exportExcel()"
               shiro:hasPermission="wm:apparatus_Inventory_list:export">
                <i class="fa fa-download"></i> 导出
            </a>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
            <button class=" btn btn-success back" onclick="location.href='/wm/apparatus_inventory'">返回</button>
        </div>

    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('wm:apparatus_Inventory_list:edit')}]];
    var removeFlag = [[${@permission.hasPermi('wm:apparatus_Inventory_list:remove')}]];
    var prefix = ctx + "wm/apparatus_Inventory_list";
    var name = $("#name").val();
    $(function () {
        var options = {
            url: prefix + "/list?name=" + name,
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "医疗器械库存清算",
            columns: [{
                checkbox: true
            },
                {
                    field: 'time',
                    title: '时间'
                },
                {
                    field: 'id',
                    title: 'ID',
                    visible: false
                },
                {
                    field: 'name',
                    title: '品名'
                },
                {
                    field: 'form',
                    title: '规格'
                },
                {
                    field: 'unit',
                    title: '剂量单位'
                },

                {
                    field: 'abs',
                    title: '摘要'
                },
                {
                    field: 'inStorageNum',
                    title: '入库数量'
                },
                {
                    field: 'inPrice',
                    title: '单价'
                },
                {
                    field: 'inTotalPrice',
                    title: '总金额'
                },
                {
                    field: 'outStorageNum',
                    title: '出库数量'
                },
                {
                    field: 'outPrice',
                    title: '单价'
                },
                {
                    field: 'outTotalPrice',
                    title: '总金额'
                },
                {
                    field: 'remainNum',
                    title: '结存数量'
                },
                {
                    field: 'remianPrice',
                    title: '单价'
                },
                {
                    field: 'remainTotalPrice',
                    title: '总金额'
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>